require 'mongrel_cluster/recipes'

set :application, "otwdb"
set :shared_server, "volunteers.transformativeworks.org"
set :repository,  "http://#{application}.googlecode.com/svn/trunk/"

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
set :deploy_to, "/var/www/#{application}"
set :shared_dir, "/home/nnovik/otwdb" 
set :mongrel_conf, "/var/www/#{application}/current/config/mongrel_cluster.yml"
set :mongrel_rails, "/var/lib/gems/1.8/bin/mongrel_rails"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion

set :use_sudo, false

role :app, shared_server
role :web, shared_server
role :db,  shared_server, :primary => true

## ADDITIONAL TASKS

desc "Link in the production database.yml" 
task :after_update_code do
  run "cp #{shared_dir}/config/database.yml #{release_path}/config/database.yml" 
end

